import { Component, OnInit } from '@angular/core';
import { Location } from '@angular/common';
import { Router } from '@angular/router';

@Component({
  selector: 'app-statistic-analysis',
  templateUrl: './statistic-analysis.component.html',
  styleUrls: ['./statistic-analysis.component.scss']
})
export class StatisticAnalysisComponent implements OnInit {
  state: string;
  constructor(private router: Router, private location: Location) { }

  ngOnInit() {
    this.state = this.location.path();
    this.router.events.subscribe(event => {
      this.state = this.location.path();
    });
  }

}
